Flutter Rows & Columns

Widgets play a key role in flutter layout where everything is a widget. Text and images are widgets but something you don’t see in a Flutter app is also widgets e.g, rows and columns, etc. Text and images are visible widgets whereas rows and columns are layout or invisible widgets. Row Widget will have its […]

Read More...

Flutter Container Widget

Do you have a widget that needs some background style, maybe a background color shape or some size constraints? Try wrapping it in a Container Widget. It helps you compose, decorate and position child widgets. Color If you wrap your widget in a container widget without any other parameters, you won’t notice any difference in […]

Read More...

Flutter Button Formatting and Passing Call back Function

We had already created a new widget for questions. Now, we’ll create a new widget for answers.  Create a new file answer.dart besides main.dart and add the following code there. Here is question.dart file previously created. In our main.dart file we’ll add the import for answer.dart and will replace ElevatedButton() code with this Answer() code […]

Read More...

Flutter Functions on Button Click

Added: In the previous post “Flutter Column Layout Widget” we created a Column() layout widget that took ‘children’ argument which was a list of Widgets, one Text() widget and three ElevatedButton() widgets. ElevatedButton() widget took two arguments. child which takes a Text() widget i.e, text of the button. onPressed which we passed null at that […]

Read More...

Dart Named Arguments

There are two types of arguments for a constructor in dart. Positional arguments – These are commonly used. For Positional arguments you have to remember which argument goes in to which place. Named arguments – This is a new concept if you belong to C++, Java or PHP. For Named Arguments you don’t need to […]

Read More...